<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Grape Admin Login</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="img/favicon.ico">
<link id="bs-css" href="bcs/css/bootstrap.min.css" rel="stylesheet">
<link href="css/charisma.app.css" rel="stylesheet">
<script src="bcs/js/jquery.min.js"></script>
<script src="bcs/js/bootstrap.min.js"></script>
<script src="js/jquery.cookie.js"></script>
<script src="js/jquery.history.js"></script>
<script src="js/autosize.min.js"></script>
<script src="js/charisma.app.js"></script>
<script src="js/highcharts.min.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
		$("form").submit(function(event) {
			event.preventDefault();
			if (!$("#username").val()) {
				$("#tip").html("Username is empty");
				return;
			}
			if (!$("#password").val()) {
				$("#tip").html("Password is empty");
				return;
			}
			var params = {};
			params.username = $("#username").val();
			params.password = $("#password").val();
			var data = JSON.stringify(params);
			$.post("/api/authen/login", data, function(data, status) {
				$(location).attr('href', "/index.html");
			}, "json");
		});
	});
</script>
</head>
<div class="ch-container">
	<div class="row">

		<div class="row">
			<div class="col-md-12 center login-header">
				<h2>Welcome to Grape</h2>
			</div>
			<!--/span-->
		</div>
		<!--/row-->

		<div class="row">
			<div class="well col-md-5 center login-box">
				<div id="tip" class="alert alert-info">Please login with your
					Username and Password.</div>
				<form class="form-horizontal" action="#">
					<fieldset>
						<div class="input-group input-group-lg">
							<span class="input-group-addon"><i
								class="glyphicon glyphicon-user red"></i></span> <input id="username"
								type="text" class="form-control" placeholder="Username">
						</div>
						<div class="clearfix"></div>
						<br>
						<div class="input-group input-group-lg">
							<span class="input-group-addon"><i
								class="glyphicon glyphicon-lock red"></i></span> <input id="password"
								type="password" class="form-control" placeholder="Password">
						</div>
						<div class="clearfix"></div>
						<p class="center col-md-5">
							<button type="submit" class="btn btn-primary">Login</button>
						</p>
					</fieldset>
				</form>
			</div>
			<!--/span-->
		</div>
		<!--/row-->
	</div>
	<!--/fluid-row-->

</div>
<!--/.fluid-container-->
</body>
</html>